﻿Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports FinRptWinForm



'''<summary>
'''This is a test class for DataProcessorTest and is intended
'''to contain all DataProcessorTest Unit Tests
'''</summary>
<TestClass()> _
Public Class DataProcessorTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    'You can use the following additional attributes as you write your tests:
    '
    'Use ClassInitialize to run code before running the first test in the class
    '<ClassInitialize()>  _
    'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    'End Sub
    '
    'Use ClassCleanup to run code after all tests in a class have run
    '<ClassCleanup()>  _
    'Public Shared Sub MyClassCleanup()
    'End Sub
    '
    'Use TestInitialize to run code before running each test
    '<TestInitialize()>  _
    'Public Sub MyTestInitialize()
    'End Sub
    '
    'Use TestCleanup to run code after each test has run
    '<TestCleanup()>  _
    'Public Sub MyTestCleanup()
    'End Sub
    '
#End Region


    '''<summary>
    '''A test for DataProcessor Constructor
    '''</summary>
    <TestMethod()> _
    Public Sub DataProcessorConstructorTest()
        Dim fy As Integer = 10 ' TODO: Initialize to an appropriate value
        Dim fp As Integer = 2011 ' TODO: Initialize to an appropriate value
        Dim target As DataProcessor = New DataProcessor(fy, fp)
        Assert.AreEqual(Of Integer)(fp, target.FiscalPeriod,
            "The fiscalPeriod was not correctly initialized.")
        Assert.AreEqual(Of Integer)(fy, target.FiscalYear,
            "The fiscalYear was not correctly initialized.")
    End Sub

  

    '''<summary>
    '''A test for ProcessData
    '''</summary>
    <TestMethod()> _
    Public Sub ProcessDataTest()
        Dim fy As Integer = 0 ' TODO: Initialize to an appropriate value
        Dim fp As Integer = 0 ' TODO: Initialize to an appropriate value
        Dim target As DataProcessor = New DataProcessor(fy, fp) ' TODO: Initialize to an appropriate value
        Dim expected As Integer = 0 ' TODO: Initialize to an appropriate value
        Dim actual As Integer
        actual = target.ProcessData
        Assert.AreEqual(-1, actual)

    End Sub

    '''<summary>
    '''A test for FiscalYear
    '''</summary>
    <TestMethod()> _
    Public Sub FiscalYearTest()
        Dim fy As Integer = 2010 ' TODO: Initialize to an appropriate value
        Dim fp As Integer = 9 ' TODO: Initialize to an appropriate value
        Dim target As DataProcessor = New DataProcessor(fy, fp) ' TODO: Initialize to an appropriate value
        Dim expected As Integer = 2010 ' TODO: Initialize to an appropriate value
        Dim actual As Integer
        target.FiscalYear = expected
        actual = 2010
        Assert.AreEqual(expected, actual)
    End Sub

    '''<summary>
    '''A test for FiscalPeriod
    '''</summary>
    <TestMethod()> _
    Public Sub FiscalPeriodTest()
        Dim fy As Integer = 2010 ' TODO: Initialize to an appropriate value
        Dim fp As Integer = 9 ' TODO: Initialize to an appropriate value
        Dim target As DataProcessor = New DataProcessor(fy, fp) ' TODO: Initialize to an appropriate value
        Dim expected As Integer = 9 ' TODO: Initialize to an appropriate value
        Dim actual As Integer
        target.FiscalPeriod = expected
        actual = 9
        Assert.AreEqual(expected, actual)
    End Sub
End Class
